$(function() {
  $(window)
    .resize(function() {
      let width = $(window).width();
      // console.log(width);
      width = Math.max(320, width);
      width = Math.min(640, width);
      let fontSize = (width / 15) * 2;
      $('html').css({ fontSize: fontSize.toFixed(2) + 'px' });
    })
    .trigger('resize');
});
